home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 2
/
Aminet AMIGA CDROM (1994)(Walnut Creek)[Feb 1994][W.O. 44790-1].iso
/
Aminet
/
misc
/
amag
/
am9305d.lha
/
EGS.lha
/
EGS
/
EGS_Devels
/
doc
/
egs.doc
next >
Wrap
Text File
|
1993-03-18
|
13KB
|
555 lines
/*
* $
* $ FILE : egs.doc
* $ VERSION : 1
* $ REVISION : 1
* $ DATE : 08-Feb-93 09:51
* $
* $ Author : mvk
* $
*
*
* (c) Copyright 1990/93 VIONA Development
* All Rights Reserved
*
*/
egs.library/E_ActivateAmigaScreen
egs.library/E_ActivateEGSScreen
egs.library/E_AddScreenMode
egs.library/E_AllocBitMap
egs.library/E_ClearBitMap
egs.library/E_CloseScreen
egs.library/E_DisposeBitMap
egs.library/E_FlipMap
egs.library/E_GetHardInfo
egs.library/E_GetRGB8
egs.library/E_GetRGB8CM
egs.library/E_ModifyEDCMP
egs.library/E_ModifyMouse
egs.library/E_MouseOff
egs.library/E_MouseOn
egs.library/E_OpenScreen
egs.library/E_ScreenToBack
egs.library/E_ScreenToFront
egs.library/E_SetRGB8
egs.library/E_SetRGB8CM
egs.library/E_WaitTOF
egs.library/E_ActivateAmigaScreen
NAME
E_ActivateAmigaScreen Activate the original amiga screen.
SYNOPSIS
E_ActivateAmigaScreen()
FUNCTION
Activates the original amiga screen, moving it to front if both sources
have the same output. Also reactivates the amiga mouse, and redirects input
to it. This function has no effect if the amiga screen is allready active.
INPUTS
RETURNS
egs.library/E_ActivateEGSScreen
NAME
E_ActivateEGSScreen Activates the egs screen.
SYNOPSIS
E_ActivateEGSScreen()
FUNCTION
Activates the egs screen, moving it to front if both sources have the same
output. Also activates the egs mouse, and redirects input (mouse, keyboard,
diskchanges etc.) to it. This function has no effect, if no egs screen is
open, or the egs screen is already active.
INPUTS
RETURNS
egs.library/E_AllocBitMap
NAME
E_AllocBitMap Allocates and initializes bitmap structure and planes...
SYNOPSIS
map = E_AllocBitMap(width, height, depth, type, flags, [friend])
D0 D0 D1 D2 D3 D4 A0
E_BitMapPtr map;
UWORD width, height, depth;
CHAR * type;
FUNCTION
Allocates display or clipping memory. Creates a bitmap structure and
allocates the needed memory. The structure is initialized. The bitmaps
are not cleared. The function allocates display or clipping (in fast mem)
memory, depending on the type. If a friend bitmap is supplied the library
determines the type out of this bitmap.
The EGS memory management regards graphics memory as an important resource.
Therefore memory segments are moved in their address location when necessary
in order to gain big consecutive segments. To prevent memory from being
tugged away right under your feet, memory must be locked before access.
For this topic refer to E_EMemNode structure in the includes.
If the system is equipped with virtuell memory, the function may allocate
huge clipping areas in the virtuell memory area.
INPUTS
width, height : Dimensions of required bitmap
depth : Depth od requeierd bitmap
type : Type of bitmap (which card etc.)
flags : properties of the bitmap (fastmem/graphicsmem etc.)
friend : Friend bitmap.
RETURNS
Inititialized bitmap if successfull, NULL else.
egs.library/E_ClearBitMap
NAME
E_ClearBitMap Clears a bitmap
SYNOPSIS
E_ClearBitMap(map)
A0
E_BitMapPtr map;
FUNCTION
Clears a bitmap by filling with zero (normaly black)
INPUTS
map : bitmap which to clear
RETURNS
egs.library/E_CloseScreen
NAME
E_CloseScreen Close a screen
SYNOPSIS
E_CloseScreen(scr)
A0
E_EScreenPtr scr;
FUNCTION
Closes a screen, which has been opened with E_OpenScreen. Frees all resources
like memory, ports, signals etc. If this screen was the last screen on the
graphicscard, the software automagically switches back to the amiga.
INPUTS
scr : Screen which to close
RETURNS
egs.library/E_DisposeBitMap
NAME
E_DisposeBitMap Free the memory, used by a bitmap
SYNOPSIS
E_DisposeBitMap(map)
A0
E_EBitMapPtr map;
FUNCTION
Returns the memory of a bitmap back to the free memory pool. This should
be done with all allocated bitmaps (for exception see E_FlipMap).
INPUTS
map : bitmap to free
RETURNS
egs.library/E_FlipMap
NAME
E_FlipMap Show double buffered bitmap
SYNOPSIS
oldmap = E_FlipMap(scr, map)
D0 A0 A1
E_EScreenPtr scr;
E_EBitMapPtr oldmap, map;
FUNCTION
Swaps the bitmaps of a screen with a bitmap. This can be used for double
buffering. The new map is then linked to the screen, the old bitmap is
returned. For double buffering, open a screen, and allocate a bitmap
with same dimensions as screens bitmap of display memory. Then render
into this bitmap. Then flip the bitmaps and assign the result of
E_FlipMap to your bitmap pointer. Now render in this map and so on.
This function attaches the new bitmap to the screen, and releases the old
one, so you have to free the old one at the programms end, not your new
bitmap (except if you reflip). You will have no problems, if you assign
the functions result to your own bitmap pointer, that previously pointed
to the new bitmap.
INPUTS
scr : screen for double buffering
map : back bitmap, which to show
RETURNS
oldmap : the previous bitmap of the screen, now that one, which can not
be seen
egs.library/E_GetHardInfo
NAME
E_GetHardInfo Get information about graphicscard
SYNOPSIS
info = E_GetHardInfo()
D0
E_HardInfoPtr info;
FUNCTION
Retrieves information about the graphicscard, including possible screen
modes.
INPUTS
RETURNS
info : Pointer to a hard info structure. The contents of the structure
may not be changed !!!
egs.library/E_GetRGB8
NAME
E_GetRGB8 Get RGB value of a clut register
SYNOPSIS
rgb = E_GetRGB8(scr, reg)
D0 A0 D0
ULONG rgb;
E_EScreenPtr scr;
UWORD reg;
FUNCTION
Returns the RGB value of an entry in the color look up table of a screen.
The colors is coded in an ULONG as RRRR RRRR GGGG GGGG BBBB BBBB xxxx xxxx.
The result can be casted into en E_CluEntry struct.
INPUTS
scr : the screens pointer
reg : number of the colorregister, use only valid entries, depending on
the screens depth
RETURNS
RGB value.
egs.library/E_GetRGB8CM
NAME
E_GetRGB8CM Get several RGB values.
SYNOPSIS
E_GetRGB8CM(scr, colors, start, num)
A0 A1 D0 D1
E_EScreenPtr scr;
E_CLUPtr colors;
UWORD start, num;
FUNCTION
Copies a part of a screens clut into a buffer. Make sure you have enough
buffer memory in your color table for this function.
INPUTS
colors : pointer to buffer
start : first register in screens clut
num : number of colors to transfer
RETURNS
egs.library/E_ModifyEDCMP
NAME
E_ModifyEDCMP Modifies the EDCMP flags of a screen
SYNOPSIS
E_ModifyEDCMP(scr, flags)
A0 D0
E_EScreenPtr scr;
ULONG flags;
FUNCTION
Sets the EDCMP flags of a screen. Opens or closes the screens port if
needed. For user defined ports the port should be removed before clearing
all flags.
INPUTS
flags : new set of edcmpflags
RETURNS
egs.library/E_ModifyMouse
NAME
E_ModifyMouse Modify the shape of a screens mouse.
SYNOPSIS
E_ModifyMouse(scr, mouse)
A0 A1
E_EScreenPtr scr;
E_EMousePtr mouse;
FUNCTION
Sets a new shape for the screens mouse pointer. This is the only legal
way to change the mouse. You may read the "mouse" field in the E_Screen
structure, to get the standardmouse, but you may not alter this field
except using this function.
If the screen is the actual displayed, the change takes place immediately.
As in EI_Screens, the mouse is attached to a window not to a screen, you
must use the function in the egsintui.library if working with windows.
INPUTS
mouse : Mouse struture with hard or soft mouse structure initialized.
This structure may not be discarded
RETURNS
egs.library/E_MouseOff
NAME
E_MouseOff Switch softwaremouse off
SYNOPSIS
E_MouseOff(scr)
A0
E_EScreenPtr scr;
FUNCTION
On graphicscard which do not have a hardwarecursor the software mouse has
to be switched of before drawing into the screens bitmap. This function
has no effect on cards offering a hardwaremouse. Calls to E_MouseOn and
E_MouseOff may be nested. This function should not be used to hide the
mouse for optical reasons, because it has no effects on cards with a
hardware mouse. You should use E_ModifyEMouse.
Not moving the mouse several seconds and calling MouseOff() results in
not turning the mouse on again at the corresponding MouseOn(). The pointer
reappears as soon as the mouse is moved.
E_MouseOff() and E_MouseOn() are nestable so that for complex drawing there
is no need to turn on and off the mouse for each element, i.e. nesting is
applicable without any complications.
Each MouseOff() must be accompanied by a corresponding MouseOn().
As functions of the egsblit.library have no information, if a screen is
attached to their bitmap, they make no calls to E_MouseOn/Off. But as the
functions in the egsgfx.library work on a rastport, they know which bitmap
is associated with a screen, they make calls to E_MouseOff/On.
INPUTS
RETURNS
egs.library/E_MouseOn
NAME
E_MouseOn Switch software mouse on
SYNOPSIS
E_MouseOn(scr)
A0
E_EScreenPtr scr;
FUNCTION
Switches a software mouse on again. See E_MouseOff.
INPUTS
RETURNS
egs.library/E_OpenScreen
NAME
E_OpenScreen Open a screen
SYNOPSIS
scr = E_OpenScreen(new)
D0 A0
E_EScreenPtr scr;
struct E_NewEScreen *new;
FUNCTION
Opens a screen on a graphicscard. This function allocates the bitmap,
initializes a port if needed, and forces the video logic to display
this screen. See also egsintui.library/EI_OpenScreen. This type of
screen is not able to have windows or layers. The function requires an
initialized E_NewScreen structur, that may be discarded afterwards.
If an port is supplied this port has to be removed, before the screen
is closed, or the message flags are set to none. The library creates
an own port, if NULL is passed.
INPUTS
new : Inizialised E_NewScreen structure
RETURNS
An opened screen if successfull else NULL. Reasons for failure may be
unknown mode, not enough memory or unsupported depth.
egs.library/E_ScreenToBack
NAME
E_ScreenToBack Moves a screen behind all others
SYNOPSIS
E_ScreenToBack(scr)
A0
E_EScreenPtr scr;
FUNCTION
Moves a screen behind all other screens on a graphicsboard. Shows the
next screen, if there are more then one.
INPUTS
RETURNS
egs.library/E_ScreenToFront
NAME
E_ScreenToFront Moves a screen to front
SYNOPSIS
E_ScreenToFront(scr)
A0
E_EScreenPtr scr;
FUNCTION
Moves a screen in front of all other screens on a graphicscard, and
displays the screen. This action may requier several milliseconds, and may
have flicker effects on the screen. For double buffering you should use
E_FlipMap instead.
INPUTS
scr : pointer to the screen
RETURNS
egs.library/E_SetRGB8
NAME
E_SetRGB8 Modify an entry in a screens clut
SYNOPSIS
E_SetRGB8(scr, reg, red, green, blue)
A0 D0 D1 D2 D3
E_EScreenPtr scr;
UBYTE reg, red, green, blue;
FUNCTION
Modifies an entry in a screens color look up table. This should only
be done in pseudo color modes, which have a look up table. In real color
modes this modifies the gamma correction table. This function may wait
for a screen blank, so do not use it to modify large areas of a clut, use
E_SetRGB8CM.
Depending on the screens bit depth up to 256 registers can be used.
In 24 bit mode the CLUT may serve as gamma correction (see hardinfo flags).
INPUTS
reg : register number to modify
red, green, blue : Color values
RETURNS
egs.library/E_SetRGB8CM
NAME
E_SetRGB8CM Mofify several entries in a screens clut
SYNOPSIS
E_SetRGB8CM(scr, colors, start, num)
A0 A1 D0 D1
E_EScreenPtr scr;
E_CLUPtr colors;
UWORD start, num;
FUNCTION
Copies a part of a color look up table in the screens clut. This function
should be used, if there are several changes in a clut. It can take some
time, because it updates all registers. So if there are changes at different
areas in the clut, you should use E_GetRGB8CM to get the full palette,
then modify and E_SetRGB8CM them back to the screen. You should not use
this function to just make one change.
The sum of start and num mey not exceed the number of available color
registers.
INPUTS
colors : buffer from which to take the colors
start : first register to modify
num : number of registers to modify
RETURNS
egs.library/E_WaitTOF
NAME
E_WaitTOF Wait for TOF
SYNOPSIS
E_WaitTOF()
FUNCTION
Sets the calling task to wait, until a vertical blank interrupt occurs.
To be shure to get the cpu in the VBlank you should change your task
priority to a high level.
If the used graphicsboard does not support an vertical blank interrupt
(see E_HardInfo) this call will have no effect and will return immediately.
INPUTS
RETURNS